﻿/**
 * @file MainForm
 *
 * @brief 
 *
 * @author gyzheng
 *
 * @mail gyazheng@gmail.com
 *
 * @date 07/27/2011 22:37:51 
 *
 */
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using CarFrameWork.Model;

namespace CarFrameWork.UI.SystemManage.RoleManage
{
    public partial class AddRoleForm : RoleFormBase
    {
        public AddRoleForm(RoleInfo role)
        {
            InitializeComponent();
            m_RoleInfo = role;
        }

        private void AddRoleForm_Load(object sender, EventArgs e)
        {
            SetTitle("添加角色");
            this.txtID.Enabled = false;
            this.txtID.BackColor = Color.LightGray;
        }

        private void okBtn_Click(object sender, EventArgs e)
        {
            if (!TestContent())
            {
                MessageBox.Show("数据项不能为空。", "提示！");
                return;
            }
            GetFormToRole();
            m_RoleInfo.Add();
            this.Close();
        }
    }
}
